#if !defined( DEBUG_MESSAGE_H_INCLUDED )
#define DEBUG_MESSAGE_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <string>
#include <fstream>
#include <iostream>

#include "format_string.h"

void do_debug_message( std::string const & file_line_str, char const * msg );

#if defined( NDEBUG )

	#define DEBUG_MESSAGE( msg )

#else // defined( NDEBUG )

	#define DEBUG_MESSAGE( msg ) do_debug_message( FILE_LINE_STRING, msg )

#endif // defined( NDEBUG )

#define RELEASE_MESSAGE( msg ) do_debug_message( FILE_LINE_STRING, msg )

// ----------------------------------------------------------
// extended Release build debug message functions
// ------------------------------------------------------------
#ifndef RELEASE_DEBUG_FILE_LOG_ON
#define RELEASE_DEBUG_FILE_LOG_ON
#endif // RELEASE_DEBUG_FILE_LOG_ON

#ifdef RELEASE_DEBUG_FILE_LOG_ON

	extern std::ofstream 		debug_logfile;

	extern void release_debug_open_log();
	extern void __cdecl release_debug_log_out( std::string  string );
	extern void release_debug_close_log();

	#define RELEASE_DEBUG_OUT_MSG( msg ) release_debug_log_out (msg ) 

#else

	#define RELEASE_DEBUG_OUT_MSG( msg ) 

#endif // RELEASE_DEBUG_FILE_LOG_ON

#endif // !defined( DEBUG_MESSAGE_H_INCLUDED )
